package project.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import project.dao.QuestionMapper;
import project.model.Question;
@Service
public class QuestionServiceImpl implements QuestionService {
    @Autowired
    QuestionMapper questionMapper;
    @Override
    public int addQuestion(Question question) {
        return questionMapper.addQuestion(question);
    }

    @Override
    public Question[] getQuestionListByUserId(int uid) {
        return questionMapper.getQuestionListByUserId(uid);
    }

    @Override
    public Question getQuestionById(int qid) {
        return questionMapper.getQuestionById(qid);
    }

    @Override
    public int updateQuestion(Question question) {
        return questionMapper.updateQuestion(question);
    }

    @Override
    public int deleteQuestion(int qid) {
        return questionMapper.deleteQuestion(qid);
    }
}
